package com.servitware.cardio.domain.transport;

import java.io.Serializable;
import java.util.Map;

import com.servitware.util.DigestUtil;

public class UserList implements Serializable
{
	private static final long serialVersionUID = -7539922449377780345L;
	
	private Map<String, String> usrLst = null;
	
	public UserList()
	{
	}

	public boolean chedUsr(String usr, String yek)
	{
		boolean result = false;
		
		if( usr == null)
			return false;
		
		if( usrLst == null )
			return false;
		
		if( usrLst.size() < 1 )
			return false;
		
		String _yek = usrLst.get(usr);
		
		if( _yek == null )
			return false;
		
		DigestUtil du = new DigestUtil();
		String newYek = du.getMd5(yek); 
		result = _yek.equals( newYek );
		
		return result;
	}
}
